using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class TradeTypesBLL
	{
		private TradeTypesDAO _TradeTypesDAO;

		public TradeTypesDAO TradeTypesDAO
		{
			get { return _TradeTypesDAO; }
			set { _TradeTypesDAO = value; }
		}

		public TradeTypesBLL()
		{
			TradeTypesDAO = new TradeTypesDAO();
		}
		public List<TradeTypes> GetTradeTypess()
		{
			try
			{
				return TradeTypesDAO.GetTradeTypess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public TradeTypes GetTradeTypes(int Id)
		{
			try
			{
				return TradeTypesDAO.GetTradeTypes(Id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddTradeTypes(TradeTypes oTradeTypes)
		{
			try
			{
				return TradeTypesDAO.AddTradeTypes(oTradeTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateTradeTypes(TradeTypes oTradeTypes)
		{
			try
			{
				return TradeTypesDAO.UpdateTradeTypes(oTradeTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveTradeTypes(TradeTypes oTradeTypes)
		{
			try
			{
				return TradeTypesDAO.RemoveTradeTypes(oTradeTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveTradeTypes(int Id)
		{
			try
			{
				return TradeTypesDAO.RemoveTradeTypes(Id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<TradeTypes> DeserializeTradeTypess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<TradeTypes>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeTradeTypess(string Path, List<TradeTypes> TradeTypess)
		{
			try
			{
				GenericXmlSerializer<List<TradeTypes>>.Serialize(TradeTypess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
